/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package es.usj.dssie.videoclub.controller;

import es.usj.dssie.videoclub.dao.DAOException;
import es.usj.dssie.videoclub.dao.DAOFactory;
import es.usj.dssie.videoclub.dto.Movie;
import javax.jws.WebMethod;
import javax.jws.WebService;

/**
 *
 * @author Nacho
 */
@WebService
public class WSAlmacen {

    public WSAlmacen(){}

    @WebMethod
    public boolean checkMovie(String name){
        try{
           Movie movie =  DAOFactory.getInstance().getMovieDAO().read(name);
           if(movie != null)
               return true;
           else
               return false;
        }catch(DAOException e){
            e.printStackTrace();
            return false;
        }
    

    }
   @WebMethod
   public boolean reserve(int idMovie, int idClient){
        return true;
   }

    @WebMethod
    public boolean invoiceMovie(int idMovie, int idClient){
        return true;
    }
}
